import os
from dotenv import load_dotenv

# Load environment variables from .env file
load_dotenv()

class Config:
    """Configuration class for Roboflow dataset download"""
    
    # Roboflow API Key - Get from https://roboflow.com/
    ROBOFLOW_API_KEY = os.getenv('ROBOFLOW_API_KEY', '')
    
    # Default download directory (current directory)
    DOWNLOAD_DIR = os.getcwd()
    
    # Default dataset format
    DEFAULT_FORMAT = 'yolov8'  # Options: yolov8, coco, pascal, tensorflow, etc.
    
    @classmethod
    def validate_config(cls):
        """Validate that required configuration is present"""
        if not cls.ROBOFLOW_API_KEY:
            raise ValueError("ROBOFLOW_API_KEY is required. Please set it in .env file or environment variables.")
        return True